{extend name="common/base" /}
{block name="title"}添加文章{/block}
{block name="main"}
<script src="/ad/js/g_add/g_add.js"></script>
     <!-- Navigation -->
	   <div id="page-wrapper">
        <div class="col-md-12 graphs">
		<div class="xs">
  	    <h3>{$res['article_id']?"编辑文章":"添加文章"}</h3>
        <div class="well1 white">
        <h5 ><a href="{:url('Article/a_list')}"><span class="label label-success">返回列表</span></a></h5>
        </div>
  	    <div class="well1 white">
        <form class="form-floating" id="g_add" novalidate="novalidate" ng-submit="submit()" action="{:url('Article/doa_add')}" method ='post' enctype="multipart/form-data">
          <fieldset>
            <div class="form-group">
              <label class="control-label">文章名称</label>
              <input name="article_title" type="text" class="form-control1 article_title" value="{$res['article_title']?$res['article_title']:''}" required="">
              <input type="hidden" name="article_id" value="{$res['article_id']?$res['article_id']:''}">
            </div>
            <div class="form-group filled">
              <label class="control-label">文章分类</label>
              <select class="form-control1 article_a_type" name="article_type_id">
              {volist name="a_type" id="gty"}
                <option value="{$gty['article_type_id']}" {$res['article_type_id']?($res['article_type_id'] == $gty["article_type_id"]?"selected":""):""}>{$gty.article_type_name}</option>
            {/volist}
              </select>
            </div>
              <div class="form-group">
                  <label class="control-label">内容</label>
                  <!-- 加载编辑器的容器 -->
                  <script id="container" name="article_content" type="text/plain" style="width:100%;">{$res['article_content']?$res['article_content']:''}</script>
                  <!-- 配置文件 -->
                  <script type="text/javascript" src="/static/ueditor/ueditor.config.js"></script>
                  <!-- 编辑器源码文件 -->
                  <script type="text/javascript" src="/static/ueditor/ueditor.all.js"></script>
                  <!-- 实例化编辑器 -->
                  <script type="text/javascript">
                      var ue = UE.getEditor('container');
                  </script>
              </div>
            <div class="form-group">
              <button type="button" class="btn btn-primary">{$res['article_id']?"提交":"下一步"}</button>
              <button type="reset" class="btn btn-default">重置</button>
            </div>
          </fieldset>
        </form>
      </div>
    </div>
		{/block}



